package com.example.day04;

import com.example.day03.UserStatus;
import com.example.eo.User;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 调用事件发布者
 */
@RestController
@RequestMapping("day04")
@RequiredArgsConstructor
public class Day04Controller {



    /** http://127.0.0.1:8000/day04/test/testEnum1   {"status4":3}
     *  发现返回的数据value变成了3
     *  {
     *     "status": null,
     *     "status1": {
     *         "value": 3,
     *         "desc": "启用"
     *     }
     * }
     *
     * @param user
     * @return
     */
    @RequestMapping(value = "/test/testEnum1" )
    public User testEnum1(@RequestBody  User user){
        return user;
    }




}
